-
-
Notifications
You must be signed in to change notification settings - Fork 908
fix: resolve issue with prev-grapheme-cluster-break function #1431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hi there! 👋
And thank you for opening your first pull request! We will review it shortly. 🏃 💨
@kgryte , @Pranavchiku, @Planeshifter Please check the integrity of this PR, and send reviews |
// Get the corresponding grapheme break and emoji properties: | ||
breaks.push( breakProperty( cp ) ); | ||
emoji.push( emojiProperty( cp ) ); | ||
if (!(cp >= 0x1F3FB && cp <= 0x1F3FF)) { // Check if the character is not a skin tone modifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too narrow a patch. It is not just skin tones, TMK, but any modifier. The implementation more generally should be refactored to ensure that grapheme clusters comprised of multiple code points are handled correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I am sorry, I got confused by seeing the original issue being raised about the colour tone.
I will try to debug and propose a generic solution to this as soon as possible.
Thank You.
// Get the corresponding grapheme break and emoji properties: | ||
breaks.push( breakProperty( cp ) ); | ||
emoji.push( emojiProperty( cp ) ); | ||
if (!(cp >= 0x1F3FB && cp <= 0x1F3FF)) { // Check if the character is not a skin tone modifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above.
This pull request has been automatically closed because it has been inactive for an extended period after changes were requested. If you still wish to pursue this contribution, feel free to reopen the pull request or submit a new one. We appreciate your interest in contributing to stdlib! |
Resolves #1092 .
Description
There's an issue with prevGraphemeClusterBreak package, if I compare the results with nextGraphemeClusterBreak for a single skin tone emoji it doesn't return the same values,
Related Issues
This pull request:
prevGraphemeClusterBreak
package #1092Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers